import 'package:flutter/material.dart';
import 'package:flutter_mode/zjw/widget/single/AspectRatio.dart';
import 'package:flutter_mode/zjw/widget/single/Baseline.dart';
import 'package:flutter_mode/zjw/widget/single/ConstrainedBox.dart';
import 'package:flutter_mode/zjw/widget/single/Container.dart';
import 'package:flutter_mode/zjw/widget/single/CustomSingleChildLayout.dart';
import 'package:flutter_mode/zjw/widget/single/FittedBox.dart';
import 'package:flutter_mode/zjw/widget/single/FractionallySized.dart';
import 'package:flutter_mode/zjw/widget/single/Offstage.dart';
import 'package:flutter_mode/zjw/widget/single/OverflowBox.dart';
import 'package:flutter_mode/zjw/widget/single/SizedBox.dart';
import 'package:flutter_mode/zjw/widget/single/SizedOverflowBox.dart';
import 'package:flutter_mode/zjw/widget/single/Transform.dart';

class SingleWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Widget list = ListView(
      children: <Widget>[
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => ContainerWidget()));
            },
            child: new Text('Container')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => FittedBoxWidget()));
            },
            child: new Text('FittedBox')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => AspectRatioWidget()));
            },
            child: new Text('AspectRatio')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => ConstrainedBoxWidget()));
            },
            child: new Text('ConstrainedBox')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => BaselineWidget()));
            },
            child: new Text('Baseline')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => FractionallySizedBoxWidget()));
            },
            child: new Text('FractionallySized')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => OffstageWidget()));
            },
            child: new Text('Offstage')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => OverflowBoxWidget()));
            },
            child: new Text('OverflowBox')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => SizedBoxWidget()));
            },
            child: new Text('SizedBox')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => SizedOverflowBoxWidget()));
            },
            child: new Text('SizedOverflowBox')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => TransformWidget()));
            },
            child: new Text('Transform')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => CustomSingleChildLayoutWidget()));
            },
            child: new Text('CustomSingleChildLayout')),
      ],
    );
    return Scaffold(
      appBar: new AppBar(
        title: new Text('单节点控件'),
        leading: new BackButton(),
      ),
      body: list,
    );
  }
}
